package gostd

import "sync"

// Mutex stdout.
var outMutex = new(sync.Mutex)

// Mutex control stdout.
func Out() Toggle {
	return Toggle{
		Lock: func() {
			outMutex.Lock()
		},
		TryLock: func() {
			outMutex.TryLock()
		},
		Unlock: func() {
			outMutex.Unlock()
		},
	}
}
